import service from "utils/request"

// 获取部门列表
export const getDeptList = (params) => {
  return service({
    url: "/dept/getDeptList",
    method: "get",
    params
  })
}

// 新增部门
export const addDept = (data) => {
  return service({
    url: "/dept/createDept",
    method: "post",
    data
  })
}

// 更新部门
export const updateDept = (data) => {
  return service({
    url: "/dept/updateDept",
    method: "put",
    data
  })
}

// 删除部门
export const deleteDept = (deptId) => {
  return service({
    url: `/dept/deleteDept/${deptId}`,
    method: "delete"
  })
}
